package com.vca.service.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.github.pagehelper.PageInfo;
import com.vca.common.model.course.CourseScheduling;
import com.vca.common.model.export.CourseSchedulingExport;
import com.vca.common.request.*;
import com.vca.common.response.AdminHeaderResponse;
import com.vca.common.response.CourseSchedulingAdminByIdResponse;
import com.vca.common.response.CourseSchedulingAdminResponse;
import com.vca.common.vo.ExcelCourseSchedulingById;

import java.util.List;

/**
 * <p>
 * 课程排课表 服务类
 * </p>
 *
 * @author chenBing
 * @since 2022-09-19
 */
public interface CourseSchedulingService extends IService<CourseScheduling> {

    /**
     * 课程排课列表
     *
     * @return
     * @author Li
     * @date 2022/11/14 15:34
     */
    PageInfo getAdminList(SchedulingAdminListRequest request, PageParamRequest pageParamRequest);

    ExcelCourseSchedulingById getBookingDetail(String id, PageParamRequest pageParamRequest);

    /**
     * 添加课程排课
     *
     * @return
     * @author Li
     * @date 2022/11/17   10:50
     */
    boolean addScheduling(SchedulingAddRequest<CourseSchedulingAdminRequest> request);

    /**
     * 修改课程排课
     *
     * @return
     * @author Li
     * @date 2022/11/17   10:50
     */
    boolean updateScheduling(CourseSchedulingAdminRequest request);

    /**
     * 课程排课列日历列表
     *
     * @return
     * @author Li
     * @date 2022/11/18 14:46
     */
    List<CourseSchedulingAdminResponse> getCalendarList(SchedulingAdminListRequest request);

    /**
     * 跟据课程id查询排期
     *
     * @param courseId
     * @return
     * @author Li
     * @date 2022/11/21 09:47
     */
    CourseSchedulingAdminByIdResponse getAdminScheduling(Long courseId);

    /**
     * 跟据课程排期id删除排期
     *
     * @param schedulingId
     * @return
     * @author Li
     * @since 2022/11/21 14:37
     */
    boolean deleteScheduling(Long schedulingId);

    /**
     * 跟据课程id查询排期
     *
     * @param courseId
     * @param pageParamRequest
     * @return
     * @author Li
     * @date 2022/11/21 09:47
     */
    PageInfo<CourseSchedulingAdminByIdResponse> getListByCourse(Long courseId, PageParamRequest pageParamRequest);

    /**
     * @return
     * @author Li
     * @date 2022/11/24
     */
    List<AdminHeaderResponse> getHeader(String dateLimit);

    /**
     * 上架课程排期预约状态
     *
     * @param courseSchedulingId 课程排期id
     * @return
     * @author Li
     * @date 2022/11/18 15:16
     */
    boolean onShell(Long courseSchedulingId);

    /**
     * 下架课程排期预约状态
     *
     * @param courseSchedulingId 课程排期id
     * @return
     * @author Li
     * @date 2022/11/18 15:16
     */
    boolean offShell(Long courseSchedulingId);

    boolean checkSchedulingDate(CourseScheduling courseScheduling);

    /**
     * @Description:根据课程截止时间来修改课程当前状态
     * @author:chenbing
     * @date 2022/11/28 16:08
     */
    boolean changeAllSchedulingStatus();

    /**
     * @param request
     * @return boolean
     * @description 取消课程排期
     * @methodName cancel
     * @author Li
     * @date 2022/12/28 16:17
     */
    boolean cancel(SchedulingCancelRequest request);

    /**
     * 课程排期导出
     */
    List<CourseSchedulingExport> getCourserSchedulingExports(String startTime, String endTime);

    /**
     * @Description:判断课程排期是否还有空余席位
     * @author:chenbing
     * @date 2023/9/18 16:58
     */
    boolean checkSchedulingQuta(Long mainId);
}
